package edu.gdkm.paydemo;
//测试类（带main方法）
public class TeacherTest {
    public static void main(String[] args) {

        int i;
        i=0;
        Teacher teacher = null;
        teacher = new Teacher();    //实例化对象
//        Teacher teacher = new Teacher();
//        teacher.teacherId = "100001";  //通过.符号调用属性和方法
//        teacher.name = "张三";
//        teacher.sex = "男";
//        teacher.salary = -3000;
//        teacher.wage =500;
        //使用private设置的属性不能直接赋值，需要通过set方法赋值
        teacher.setTeacherId("10001");
        teacher.setName("张三");
        teacher.setSex("男");
        teacher.setSalary(-3000);
        teacher.setWage(500);
        teacher.print();
        System.out.println("总收入："+teacher.total());

        Teacher teacher1 =new Teacher("10002","李四","女");
        teacher1.print();
        System.out.println("总收入："+teacher1.total());


    }
}
